﻿#region Copyright

//  ======================================================
//      Copyright (c) 2011 Toulr All rights reserved.
//     
//      The use and distribution terms for this software are contained in the file
//      named license.txt, which can be found in the root of this distribution.
//      By using this software in any fashion, you are agreeing to be bound by the
//      terms of this license.
//     
//     You must not remove this notice, or any other, from this software.
//  ======================================================

#endregion

#region Using Namespaces

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Toulr.Domains.Business;

#endregion

namespace Toulr.Domains.Account
{
    /// <summary>
    ///   用户账户信息，包括用户的银行卡、账户余额、账户积分等信息
    /// </summary>
    public class UserAccount
    {
        #region Property
        [Key]
        public int Id { get; set; }

        /// <summary>
        ///   用户ID
        /// </summary>
        public int UserId { get; set; }

        /// <summary>
        ///   总共消费金额
        /// </summary>
        public float TotalBuy { get; set; }

        /// <summary>
        ///   总完成订单数
        /// </summary>
        public int BillCount { get; set; }

        /// <summary>
        ///   未完成订单数
        /// </summary>
        public int BillInProcess { get; set; }

        /// <summary>
        ///   取消的订单数
        /// </summary>
        public int BillCanceled { get; set; }

        /// <summary>
        ///   收入总和
        /// </summary>
        public float Income { get; set; }

        /// <summary>
        ///   帐号余额
        /// </summary>
        public float Balance { get; set; }

        #endregion

        #region Association Objects

        /// <summary>
        ///   用户
        /// </summary>
        [NotMapped]
        public User User
        {
            get { throw new NotImplementedException(); }
        }

        /// <summary>
        ///   该用户关联的订单列表
        /// </summary>
        [NotMapped]
        public virtual ICollection<Bill> Orders
        {
            get { throw new NotImplementedException(); }
        }

        #endregion
    }
}